Software transactional memory (STM) mechanism may be used for controlling access to shared memory in concurrent computing. A transaction may include code that executes a series of operations, e.g., read and/or write operations, to shared memory.
After completing an entire transaction, it is verified that changes to the shared memory have not been concurrently made by the execution of other transactions. The operation, in which the changes of a transaction are validated and, if validation is successful, made permanent, is called a commit.
A transaction may also abort at any time, causing all of its prior changes to be rolled back or undone. If a transaction cannot be committed due to conflicting changes, it is typically aborted and re-executed from the beginning until it succeeds.